package com.zsy.mapper;

import com.zsy.pojo.Dept;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;

import java.util.List;

@Mapper
public interface DeptMapper {
/*    //column = ""表示数据库的字段名 property = ""表示实体类的属性名
    @Results(id = "deptMap", value = {
            @Result(id = true, property = "id", column = "id"),
            @Result(property = "name", column = "name"),
            @Result(property = "createTime", column = "create_time"),
            @Result(property = "updateTime", column = "update_time")
    })*/
    //查询所有部门
    public List<Dept> findAll();

    //删除部门根据id
    public void deleteDeptById(Integer id);

    public void addDept(Dept dept);

    public Dept getDeptById(Integer id);

    public void updateDept(Dept dept);

    Integer selectDeptEmp(Integer id);
}
